<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>秋冬新风尚</title>
    <link rel="stylesheet" href="../../css/model.css">
    <link rel="stylesheet" href="../style/autuwinter-1016/style.css">
</head>

<body>
    <div class="header"></div>
    <div class="main">
        <div class="title"></div>
        <!-- one -->
        <ul class="nav">
            <li class="cur"><img src="../images/autuwinter-1016/1.png" class="one-img" alt=""><p>换新装</p></li>
            <li><img src="../images/autuwinter-1016/2.png" alt=""><p>品质男装</p></li>
            <li><img src="../images/autuwinter-1016/3.png" alt=""><p>秋冬鞋包</p></li>
            <li><img src="../images/autuwinter-1016/4.png" alt=""><p>内衣配饰</p></li>
        </ul>
        <p class="title-f">// 全场直降，低至6.4折 //</p>
        <div class="container">
        </div>
        <!-- tow -->
        <ul class="nav">
            <li><img src="../images/autuwinter-1016/1.png" class="one-img" alt=""><p>换新装</p></li>
            <li class="cur"><img src="../images/autuwinter-1016/2.png" alt=""><p>品质男装</p></li>
            <li><img src="../images/autuwinter-1016/3.png" alt=""><p>秋冬鞋包</p></li>
            <li><img src="../images/autuwinter-1016/4.png" alt=""><p>内衣配饰</p></li>
        </ul>
        <p class="title-f">// 最高直降80元，全场低至5.8折 //</p>
        <div class="container">
        </div>
        <!-- three -->
        <ul class="nav">
            <li><img src="../images/autuwinter-1016/1.png" class="one-img" alt=""><p>换新装</p></li>
            <li><img src="../images/autuwinter-1016/2.png" alt=""><p>品质男装</p></li>
            <li class="cur"><img src="../images/autuwinter-1016/3.png" alt=""><p>秋冬鞋包</p></li>
            <li><img src="../images/autuwinter-1016/4.png" alt=""><p>内衣配饰</p></li>
        </ul>
        <p class="title-f">// 最高直降80元，全场4.6折起 //</p>
        <div class="container">
        </div>
        <!-- four -->
        <ul class="nav">
            <li><img src="../images/autuwinter-1016/1.png" class="one-img" alt=""><p>换新装</p></li>
            <li><img src="../images/autuwinter-1016/2.png" alt=""><p>品质男装</p></li>
            <li><img src="../images/autuwinter-1016/3.png" alt=""><p>秋冬鞋包</p></li>
            <li class="cur"><img src="../images/autuwinter-1016/4.png" alt=""><p>内衣配饰</p></li>
        </ul>
        <p class="title-f">// 最高直降80元，全场低至6.7折 //</p>
        <div class="container">
        </div>
        <!-- bt -->
        <div class="back-top"></div>
    </div>
    <div class="footer"></div>

    <!-- Template -->
    <script type="text/html" id="card-tpl">
        <img src="{{pic}}" alt="">
        <div>
            <p>{{name}}</p>
            <div>
                <p>活动价:￥<span>{{discountPrice}}</span>&nbsp;&nbsp;<i>原售价:￥<span>{{price_on_tag}}</span></i></p>
            </div>
            <i>立即抢购</i>
        </div>
    </script>
    <script type="text/html" id="ctx-tpl">
        {{each $data}}
            <a class="card" target='_blank'></a>
        {{/each}}
    </script>

</body>
<script type="text/javascript" src="../../js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../../js/art-template.js"></script>
<script src="../../js/login.js"></script>
<script src="../../js/model.js"></script>
<script>
    // init start
    var WWW_URL = 'http://www.cjwsc.com';
    $(".header").topBox();
    $(".footer").footBox();
    // init end
    (function ($, template) {
        var info = [
            [142300,142299,122092,143601,142717,141869,144183,146383,146485,144640,144638,134633,138618,140098,140125,143456,141855,141853,141548,137943,142229,141937,141598,141930,146750,140923,103906],
            [142084,142086,141621,141620,134947,123419,120612,141583,141586,142571,142574,144651,140500,140452,143863,143341,143354,143342,142077,138249,144735,143422,142552,142566],
            [142664,125656,142663,144603,83385,143949,141051,139906,146499,143587,142163,143112,146498,146494,143806,143385,73450,88102,142537,142535,142530,120838,141710,139089],
            [142950,142949,142478,147373,143523,147356,146623,109174,144396,130591,137093,41233]
        ]

        function getData(id, idx, index) {
            $.ajax({
                url: 'http://www.cjwsc.com/qcwdProduct/getProductByIds',
                data: {
                    ids: id,
                    business_type: 10,
                    client_type: 1
                },
                dataType: "jsonp",
                jsonp: 'jsonpcallback',
                success: function (res) {
                    var href = 'http://www.cjwsc.com/item/' + id + '.html';
                    res.msg[0].index = idx + 1;
                    res.msg[0].pic = res.msg[0].pic.replace('240_240', '800_800')
                    var element = index ? $('.container').eq(index).find('.card').eq(idx) : $('.card').eq(idx);
                    element.html(template('card-tpl', res.msg[0])).attr('href', href);
                    if (res.msg[0].stock_num == 0 || res.msg[0].status == 2) element.addClass('masker')
                        .removeAttr('href');
                }
            })
        }

        function setData(info){
            for(var i=0,len=info.length;i<len;i++){
                $('.container').eq(i).html(template('ctx-tpl',info[i]))
                for(var j=0,leng=info[i].length;j<leng;j++){
                    getData(info[i][j],j,i)
                }
            }
            $('.card').eq(0).addClass('cur')
        }
        setData(info)

        $('.nav').on('click','li',function(){
            var $this = $(this);
            $('html,body').animate({
                scrollTop: $('.nav').eq($this.index()).offset().top
            }, 500)
        })

        

        $('.back-top').on('click', function () {
            $('html,body').animate({
                scrollTop: 0
            }, 500)
        })
    })($, template)
</script>

</html>











